/*
 * Copyright 1999-2010 Alibaba.com All right reserved. This software is the
 * confidential and proprietary information of Alibaba.com ("Confidential
 * Information"). You shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license agreement you entered
 * into with Alibaba.com.
 */
package com.alibaba.aone.casestudy.napoli;



import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.napoli.client.NapoliClientException;
import com.alibaba.napoli.client.async.impl.DefaultAsyncReceiver;

/**
 * 接收jms消息的类
 * @author gaojian 2011-5-4 下午02:42:06
 */
public class NapoliReceiver {

    @Autowired
    private DefaultAsyncReceiver      defaultReceiver;

    public void init() throws NapoliClientException {
        defaultReceiver.start();
    }

    public void close() {
        if (defaultReceiver != null) defaultReceiver.close();
    }
}

